fix(ci): complete guard fix — prevent bump-sha infinite loop#141
Conversation
When the Guard step sets skip=true, downstream steps with conditions like 'steps.analyze.outputs.bump != none' would still run because an empty string is not equal to 'none'. This caused Calculate/Create/Summary to execute with empty LATEST_TAG, producing the invalid tag 'v..'. Add 'steps.guard.outputs.skip != true' to all four dependent steps.
When guard sets skip=true, steps.check never runs so its output is empty string. 'empty != true' evaluates to true in GitHub Actions, causing Run bump-self-sha.sh and Commit steps to execute despite the guard. Fix by adding steps.guard.outputs.skip != 'true' to both steps.
The ingest job and repository_dispatch trigger were removed from issue-ops.yml in a previous cleanup commit but the tests were not updated. Align tests with the current 3-job structure (lifecycle, maintenance, manual) and remove assertions for the deleted ingest mode and its associated secrets (sentry-token, linear-token).
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR updates GitHub Actions workflows and their tests. Guard-based conditional gating is added to release and bump workflows to prevent bot-authored commits from triggering those actions. Separately, workflow consolidation removes the ChangesGuard-based Conditional Gating
Workflow Consolidation: ingest Mode/Job Removal
Reusable Workflow Dependency Update
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|



Summary
Completes the fix for the infinite SHA-bump loop. PR #136 added the Guard step and detection logic, but missed adding
steps.guard.outputs.skip != 'true'to the two steps that actually perform the work:Run bump-self-sha.sh— was gated only onsteps.check.outputs.skip != 'true'; whencheckis skipped, its output is"", and"" != 'true'evaluates totruein GitHub Actions, so the script ran anywayCommit, supersede older bumps, open PR— same issue; commit and PR creation executed despite the guard firingAlso fixes the same empty-output problem in
auto-release.ymlforCalculate new version,Create and push tag,Summary, andNo release neededsteps.Additionally aligns the SHA in
docs.yml/manifest.ymlto the current main HEAD (after bump PRs #138/#139 merged), and updates stale BATS tests that were asserting against a removedingestjob andrepository_dispatchtrigger inissue-ops.yml.Root cause pattern
In GitHub Actions, when a step is skipped, its outputs are empty strings. Any condition like
steps.X.outputs.Y != 'some_value'will betruewhenXwas skipped, because"" != 'some_value'. The fix is to always gate downstream steps on the guard output directly.Test plan
on-main-bump-shacreates one bump PR and stops (no second PR after the bump is merged)Need help on this PR? Tag
@codesmithwith what you need.Summary by CodeRabbit